package com.hckj.jianzhijia.model;

import com.avos.avoscloud.AVObject;
import com.avos.avoscloud.AVUser;

/**
 * Created by 赵奇隆 on 2016-03-14.
 */
public class PushInfo {

    private String pushContent;
    private String pushTitle;
    private int state;
    private String pushTarget;
    private String companyName;
    private String userPhone;
    private String failReason;
    private AVUser user;

    private AVObject avObject;


    public PushInfo(AVUser user, String pushContent, String pushTitle, int state, String pushTarget, String companyName, String userPhone,String failReason) {
        this.user = user;
        this.pushContent = pushContent;
        this.pushTitle = pushTitle;
        this.state = state;
        this.pushTarget = pushTarget;
        this.companyName = companyName;
        this.userPhone = userPhone;
        this.failReason = failReason;
        this.avObject.put("user",user);
        this.avObject.put("pushContent",pushContent);
        this.avObject.put("pushTitle",pushTitle);
        this.avObject.put("state",state);
        this.avObject.put("pushTarget",pushTarget);
        this.avObject.put("companyName",companyName);
        this.avObject.put("userPhone",userPhone);
        this.avObject.put("failReason",failReason);
    }

    public AVObject getAvObject() {
        return avObject;
    }

    public void setAvObject(AVObject avObject) {
        this.avObject = avObject;
    }

    public PushInfo(AVObject avObject) {


        this.user = avObject.getAVUser("user");
        this.pushContent = avObject.getString("pushContent");
        this.pushTitle = avObject.getString("pushTitle");
        this.state = avObject.getInt("state");
        this.pushTarget = avObject.getString("pushTarget");
        this.companyName = avObject.getString("companyName");
        this.userPhone = avObject.getString("userPhone");
        this.failReason = avObject.getString("failReason");

    }

    public String getPushContent() {
        return pushContent;
    }

    public void setPushContent(String pushContent) {
        this.pushContent = pushContent;
    }

    public String getPushTitle() {
        return pushTitle;
    }

    public void setPushTitle(String pushTitle) {
        this.pushTitle = pushTitle;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getPushTarget() {
        return pushTarget;
    }

    public void setPushTarget(String pushTarget) {
        this.pushTarget = pushTarget;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public AVUser getUser() {
        return user;
    }

    public void setUser(AVUser user) {
        this.user = user;
    }
}
